package com.som.service.excel.data2.process;

import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.LinkedList;
import java.util.Map;
import java.util.Map.Entry;

import com.som.bean.data2.input.MergerCompDataInput;
import com.som.bean.data2.output.NotAllData;
import com.som.console.ExcelProcException;
import com.som.service.excel.ExcelConvOutputDataProcessInf;

/**
 * 将数据进行合并后的结果,所有文件中都不存在的数据
 * 
 * @author liujun
 * @date 2016年4月10日
 * @verion 0.0.1
 */
public class NotAllDataOutProcess implements ExcelConvOutputDataProcessInf<Map<String, MergerCompDataInput>, NotAllData>
{

	public Map<String, NotAllData> convOutProcessData(Map<String, MergerCompDataInput> param,LinkedList<String> column) throws ExcelProcException
	{
		Map<String, NotAllData> result = null;

		if (null != param && !param.isEmpty())
		{
			result = new LinkedHashMap<String, NotAllData>();

			Iterator<Entry<String, MergerCompDataInput>> iter = param.entrySet().iterator();
			Entry<String, MergerCompDataInput> mergerEntry = null;
			MergerCompDataInput mergerInput = null;

			// 输出信息
			NotAllData notall = null;

			while (iter.hasNext())
			{
				mergerEntry = iter.next();
				mergerInput = mergerEntry.getValue();

				if (null != mergerInput)
				{
					// 组将输出对象
					notall = new NotAllData();

					notall.setIpaddress(mergerInput.getIpaddress());
					notall.setNetwork(mergerInput.getNetwork());
					notall.setNeInfo(mergerInput.getNeInfo());
					notall.setAreainfo(mergerInput.getAreainfo());

					result.put(mergerInput.getIpaddress(), notall);
				}
			}
		}

		return result;

	}

}
